(function(){var d;try{(function(n){var i=-85.05112878,r=85.05112878,o=-180,s=180,t=256,h=48,c=128,l="en-US",a=180/Math.PI,u=Math.PI/180,f=6378137,v=2*Math.PI*f,e=32,y=99,p=1800,w=732,b=464,k={left:384,right:70,top:70,bottom:30},d=function(){function n(n,i,r,u,f,e,o,s,h,c,a,v,p,w,b,k,d,g,nt,tt,it,rt,ut){var ct,et,ot;s=this._getPrimerPrimitivesFromServerRenderedCard()||s;o=this._getMapBoundsFromCardPrimerResponse()||o;this._downloadedQueuedImage={};this._parentDiv=typeof n=="string"?document.getElementById(n):n;a==="r"&&window.matchMedia("(-ms-high-contrast:active)").matches?(this._tileFormat=w,this._labelFormat=b):(this._tileFormat=v,this._labelFormat=p);this._tileFormat&&(this._tileFormat=this._updateTileUrlWithImageFormat(this._tileFormat,it));this._width=this._parentDiv.offsetWidth;this._sessionId=nt;this._isNavLeft=tt;this._isLocalGuideEnabled=ut;var ft=document.getElementById("b_header"),st=document.getElementById("b_footer"),ht=0;if(ft&&(ht=st?ft.clientHeight-st.clientHeight:ft.clientHeight-20),this._height=this._parentDiv.offsetHeight+ht,this._tilesLoaded=0,this.locationInfo=this._getTilePrimerLocationInfo(u,f,e,o,this._getPoiPrimerPoiLocations(s),h,c,k,d,this._isNavLeft,rt),this._findBestMapViewFromLocationInfo(this.locationInfo),ct=Math.floor(this.locationInfo.zoom),this._zoom=Math.max(3,ct),a==="be2"&&(this._zoom=Math.min(this._zoom,19)),this._maxTileCoordinate=Math.pow(2,this._zoom)-1,this._tileSize=t,this._centerTile=this._latlongToPixelXY(this.locationInfo.centerPointLocation.latitude,this.locationInfo.centerPointLocation.longitude,this._zoom),this._centerTileX=this._centerTile.x/this._tileSize,this._centerTileY=this._centerTile.y/this._tileSize,this._centerOffset={x:-(this._centerTile.x%this._tileSize),y:-(this._centerTile.y%this._tileSize)},this._centerOffset.x+=this._width/2,this._centerOffset.y+=this._height/2,this._mkt=i||l,this._geopolUserRegion=r,this._tileFormat&&g)et=new RegExp("amp;","g"),this._tileFormat=this._tileFormat.replace(et,""),this._labelFormat=this._labelFormat&&this._labelFormat.replace(et,"");else return;ot=/&cstl=(?=&|$)/;this._tileFormat=this._tileFormat.replace(ot,"");this._labelFormat=this._labelFormat&&this._labelFormat.replace(ot,"");this._tileContainer=document.createElement("div");this._tileContainer.style.cssText="position:relative;overflow:hidden;z-index:".concat(y,";width:").concat(this._width,"px;height:").concat(this._height,"px");this._parentDiv.appendChild(this._tileContainer);this._addTiles()}return n.prototype.unWrap=function(){this._tileContainer&&this._parentDiv&&this._parentDiv.removeChild(this._tileContainer)},n.prototype._updateTileUrlWithImageFormat=function(n,t){var u=!1,i,r;try{u=document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")===0}catch(f){}return i=n.indexOf("{shading}")>-1,i&&(n=n.replace("{shading}",t?"t":"hill")),r=t&&i&&u,n.indexOf("{imageFormat}")>-1?n=n.replace("{imageFormat}",r?"webp,95":"jpeg,95"):r&&(n+="&o=webp"),n},n.prototype._getPrimerPrimitivesFromServerRenderedCard=function(){var n=null,t=document.getElementsByClassName("nonajaxCardPrimer")[0];return t&&window.cardPrimerViewModel&&window.cardPrimerViewModel.PrimerParseSelector&&(n=this._getPrimitivesFromCardPrimerResponse(t.innerHTML,window.cardPrimerViewModel.PrimerParseSelector)),n},n.prototype._getMapBoundsFromCardPrimerResponse=function(){var s,h=document.getElementsByClassName("nonajaxCardPrimer")[0],r,u,f,t,c,e,i,l,o,n;if(h&&window.cardPrimerViewModel&&window.cardPrimerViewModel.PrimerParseSelector&&(r=h.innerHTML,u=window.cardPrimerViewModel.PrimerParseSelector,r))for(f=document.createElement("div"),f.innerHTML=r,t=0,c=u.length;t1&&(s=[n.boundingBox[0].latitude,n.boundingBox[0].longitude,n.boundingBox[1].latitude,n.boundingBox[1].longitude]);return s},n.prototype._getPrimitivesFromCardPrimerResponse=function(n,t){var s=[],f,r,h,e,u,c,o,i;if(n)for(f=document.createElement("div"),f.innerHTML=n,r=0,h=t.length;r0&&(t=[],n.forEach(function(n){t.push({latitude:n.geometry.y,longitude:n.geometry.x})}),t=this._cullOutlierLocations(t)),t},n.prototype._cullOutlierLocations=function(n){var u=.675,f=7,r,a;if(n.length<15)return n;var t=n.map(function(n){return n.latitude}),i=n.map(function(n){return n.longitude}),e=t.sort()[Math.floor(t.length/2)],o=i.sort()[Math.floor(i.length/2)],s=t.map(function(n){return Math.abs(n-e)}),h=i.map(function(n){return Math.abs(n-o)}),c=s.sort()[Math.floor(s.length/2)],l=h.sort()[Math.floor(h.length/2)];return c===0||l===0?n:(r=n.filter(function(n){var t=u*Math.abs(n.latitude-e)/c20?Math.ceil(n.length/10):2,n.length-r.length>a?n:r)},n.prototype._getTilePrimerLocationInfo=function(n,t,i,r,u,f,o,s,h,c,l){var a,g,v,nt,y,d;return n&&t?a={centerPointLocation:{latitude:parseFloat(n),longitude:parseFloat(t)},zoom:i,isExplicitCenterPointSet:!0}:(g=this._getBootstrapLocation(i,f,o),v=g.split(","),v&&v.length>=3&&(a={centerPointLocation:{latitude:parseFloat(v[0]),longitude:parseFloat(v[1])},zoom:parseFloat(v[2])})),u&&!s&&(u.length>1?a.locations=u:a.isExplicitCenterPointSet||(a.centerPointLocation=u[0],a.zoom=16)),a.bounds=r,!h||window.history&&window.history.state||(a.viewportPadding=this._isNavLeft?{left:436,right:70,top:0,bottom:30}:{left:384,right:70,top:70,bottom:30}),nt=this._getContentFirstRoot(),nt?a.viewportPadding={left:l?l+e:0,right:70,top:70,bottom:30}:this._isLocalGuideEnabled&&(y=sj_cook.get("LGPGLYT","value"),y&&y==="foc"||(d=_w&&_w.innerWidth&&_w.innerWidth>=p&&y!=="ins"?w:b,d>0&&(a.viewportPadding=k,a.viewportPadding.left=d+e))),a},n.prototype._getContentFirstRoot=function(){var n=document.getElementsByClassName("nonajaxLGCardPrimer");return n&&n.length>0?n[0]:null},n.prototype._getBootstrapLocation=function(n,t,i){var r=t,o;if(!r||r==="0,0"){var u=MapsLocalStorage&&MapsLocalStorage.LocalStorageCache,f=parseFloat(u.getItem("centerLatitude")),e=parseFloat(u.getItem("centerLongitude"));if(isFinite(f)&&isFinite(e))return o=parseFloat(u.getItem("zoom")),isFinite(o)?f+","+e+","+o:f+","+e+","+n;r=i}return r+","+n},n.prototype._findBestMapViewFromLocationInfo=function(t){var i=null,r=null,u=null,f=this._width,e=this._height,o,s,h;if(t.viewportPadding){var c=t.viewportPadding.left,l=t.viewportPadding.top,y=this._width-t.viewportPadding.right,p=this._height-t.viewportPadding.bottom;f=y-c;e=p-l;r=c+f/2;u=l+e/2}if(t.isExplicitCenterPointSet||(t.locations&&t.locations.length>1?i=n.accumulate(t.locations):t.bounds&&t.bounds.length==4&&(o={latitude:t.bounds[0],longitude:t.bounds[1]},s={latitude:t.bounds[2],longitude:t.bounds[3]},i=n.accumulate([o,s]))),i){var o={latitude:i[0],longitude:i[1]},w={latitude:i[0],longitude:i[3]},b={latitude:i[2],longitude:i[1]},s={latitude:i[2],longitude:i[3]},k={latitude:i[0],longitude:0},d={latitude:i[2],longitude:0},a={latitude:(i[2]+i[0])/2,longitude:(i[1]+i[3])/2},g=n._greatCircleDistance(o,w),nt=n._greatCircleDistance(b,s),tt=Math.max(g,nt),it=n._greatCircleDistance(k,d),rt=tt/f,ut=it/e,v=Math.max(rt,ut),ft=v!==0?n._getZoomFromMetersPerPixel(a.latitude,v):16;t.zoom=ft;t.centerPointLocation=a}h=null;r&&u&&(h=this._getAdjustedLocationAligningToGivenViewportCenter(t.zoom,t.centerPointLocation,r,u));t.centerPointLocation=h||t.centerPointLocation},n.prototype._addTile=function(n,t,i,r,u){var f=this,e=document.createElement("img"),s=Microsoft.Maps.setTimeout(function(){return o()},5e3),o=function(){e.onload=e.onerror=e.onabort=null;window.clearTimeout(s);f._downloadedQueuedImage[t]!==undefined&&u?r?f._downloadedQueuedImage[t]=e:(f._tileContainer.appendChild(e),f._downloadedQueuedImage[t]=null):(f._tileContainer.appendChild(e),f._downloadedQueuedImage[t]&&f._tileContainer.appendChild(f._downloadedQueuedImage[t]),delete f._downloadedQueuedImage[t],++f._tilesLoaded===f._tileCount&&typeof performance!="undefined"&&performance.now&&(window.Maps_PPLT=performance.now()))};e.onload=function(){return o()};e.onerror=e.onabort=function(){return o()};e.src=n;e.style.cssText="position:absolute;z-Index:"+(r?1:0)+";top:"+i.y+"px;left:"+i.x+"px"},n.prototype._getImageUrl=function(n,t){var r=t.charAt(t.length-1),i=n.replace("{quadkey}",t).replace("{x}",Math.floor(this._tileX).toString()).replace("{y}",Math.floor(this._tileY).toString()).replace("{zoom}",this._zoom.toString()).replace("{bbox}","").replace("{subdomain}",(parseInt(r)%2).toString()).replace("{mkt}",this._mkt);return this._geopolUserRegion?i.replace(/{ur}/,this._geopolUserRegion):i.replace(/&ur={ur}/,"")},n.prototype.isTileLoadingCompleted=function(){return this._tilesLoaded===this._tileCount},n.prototype._addTiles=function(){var i,n,t;for(this._tileX=this._centerTileX,this._tileY=this._centerTileY,this._offset=this._centerOffset,this._direction=0,this._movesLeft=1,this._step=1,i=0,this._tileCount=0;ithis._maxTileCoordinate)return null;for(i="",n=this._zoom;n>0;n--)t=0,r=1<-this._tileSize&&n.y-this._tileSize&&n.x-this._tileSize+t&&n.y-this._tileSize+t&&n.xthis._maxTileCoordinate?this._tileX=0:this._tileX<0&&(this._tileX=this._maxTileCoordinate);this._movesLeft--;this._movesLeft<=0&&(this._movesLeft=Math.floor(this._step+=.5),++this._direction>3&&(this._direction=0))},n.prototype._latlongToPixelXY=function(n,t,u){var h=this._median(n,i,r),c=this._median(t,o,s),l=(c+180)/360,e=Math.sin(h*Math.PI/180),a=.5-Math.log((1+e)/(1-e))/(4*Math.PI),f=this._tileSize<360&&(f=-180,u=180),f=n._normalizeLongitude(f),u=n._normalizeLongitude(u),f>u&&(u+=360),i[1]=f,i[3]=u,i},n._normalizeLongitude=function(n){return n<-180||n>180?n-Math.floor((n+180)/360)*360:n},n._getZoomFromMetersPerPixel=function(i,r){return Math.log(Math.cos(n._degreesToRadians(i))*v/(t*r))/Math.log(2)},n.prototype._getAdjustedLocationAligningToGivenViewportCenter=function(i,r,u,f){var e=Math.pow(2,i),o=e*t,s=e*t,h=n._projectToMercatorX(r.latitude,r.longitude),c=n._projectToMercatorY(r.latitude,r.longitude),l=u-this._width/2,a=f-this._height/2,v=h-l/o,y=c-a/s;return{latitude:n._projectMercatorYToLatitude(y),longitude:n._projectMercatorXToLongitude(v)}},n._projectToMercatorX=function(n,t){return t/360+.5},n._projectToMercatorY=function(n){if(n>=r)return 0;if(n<=i)return 1;var t=Math.sin(n*u);return.5-Math.log((1+t)/(1-t))*1/(4*Math.PI)},n._projectMercatorXToLongitude=function(n){return(n-.5)*360},n._projectMercatorYToLatitude=function(n){return 90-2*Math.atan(Math.exp((n*2-1)*Math.PI))*a},n}();n.Primer=d})(d||(d={}));var n=window.$MicrosoftMaps8,u=n.Internal,w=n.Anchor,ri=u._AnimationRenderer,c=u._BaseMapTemplateSelector,vt=n.BasicTemplate,or=n.BirdseyeV2Manager,ui=n.BirdseyeV2Metadata,rt=n.BitmapImageTemplate,sr=u._BoundsAccumulator,hr=u.CanvasDrawingContext,ot=u._Color,cr=n.CompositeMapMode,yt=u.ControlTemplate,lr=n.DefaultTemplateSelector,o=u._Gimme,pt=n.GlobalConfig,i=u._Helper,fi=n.ImageryMapLayer,r=u._JSEvent,wt=n.LabelVisibility,ar=u._LatLonCrs,vr=u._LayerRendererManager,st=n.LocationRect,yr=u._LruCache,p=u.MapHelper,ei=n.MapLayer,y=n.Location,oi=n.MapView,si=n.MapViewAnimator,hi=n.MercatorCubeCrs,ht=u._MercatorTileUtility,ct=u._Observable,ci=u._ObservableCollection,pr=u._ObservableObject,l=u._ObservableObjectChangedArgs,bt=u._Overlay,wr=u._OverlayEntity,li=u._PerfV2Logger,f=n.Point,ai=n.RasterImageryScene,vi=n.SimpleAreaPrimitive,yi=n.SimpleLinePrimitive,pi=n.SimplePointPrimitive,wi=n.VectorMapLayer;n.LabelOverlay=wt;var br=n.Size,bi=n.VectorImageTemplate,g=n.ZoomLevel,t=n.MapTypeId,lt=u._MapAuthentication,kr=u._LoggingWrapper,ki='
close infobox <\/a>
<\/div>
<\/div>
  • <\/a> <\/li> <\/DataTemplate> <\/ItemsControl.ItemTemplate> <\/ItemsControl> <\/div> <\/div> <\/div>
    <\/div> <\/div>
    <\/div>
    <\/div> <\/div><\/div>',di='
    <\/div><\/div>',a=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),ut=function(){function n(t){if(this._registeredJsEvents={},this._options={beneathLabels:n._defaultOptions.beneathLabels,showInBirdseye:n._defaultOptions.showInBirdseye,drawOrder:n._defaultOptions.drawOrder},t&&(typeof t.beneathLabels=="boolean"&&(this._options.beneathLabels=t.beneathLabels),typeof t.showInBirdseye=="boolean"&&(this._options.showInBirdseye=t.showInBirdseye),typeof t.drawOrder=="number")){this._useDrawOrder=!0;var i=Math.round(t.drawOrder);this._options.drawOrder=i?i>0?Math.min(i,n._maxDrawOrder):Math.max(i,-1*n._maxDrawOrder):n._defaultOptions.drawOrder}}return n.prototype.getHtmlElement=function(){return this._htmlElement&&this._htmlElement[0]},n.prototype.setHtmlElement=function(n){var t=o(n);this._map&&(t.length>0&&this._insertHtmlElement(t),this._htmlElement&&this._htmlElement.removeFromParent());this._htmlElement=t},n.prototype.getOptions=function(){return this._options},n.prototype.onAdd=function(){},n.prototype.onRemove=function(){},n.prototype.onLoad=function(){},n.prototype.attachMap=function(n){var t=this,i;if(this._map)throw new Error("This custom overlay is already attached to an existing map");n&&(this.onAdd(),this._map=n,i=this._map.getV8Map(),ri.containsCustomOverlay(),this._onMapTypeChanged=i.mapTypeChanged.add(function(){t._map&&i.getFrameManager().frameRendered.addOne(function(){t._insertHtmlElement(t._htmlElement)})}),i.labelControllerLoaded.addOne(function(){t._insertHtmlElement(t._htmlElement);t.onLoad()},!1,!0))},n.prototype.detachMap=function(n){if(this._map&&this._map!==n)throw new Error("Cannot remove custom overlay from this map since it's attached to another map instance");this._internalCleanup()},n.prototype.getMap=function(){return this._map},n.prototype.dispose=function(){for(var n in this._registeredJsEvents)i._undefineJSEventForDomEvent(this._htmlElement,n,this._registeredJsEvents[n].id),this._registeredJsEvents[n].dispose();this._internalCleanup();i._nullifyClass(this)},n.prototype._internalCleanup=function(){this._htmlElement&&this._htmlElement.removeFromParent();this._onMapTypeChanged&&this._onMapTypeChanged.dispose();this._map=null;this.onRemove()},n.prototype._insertHtmlElement=function(n){var r=this._useDrawOrder?this._options.drawOrder:this._options.beneathLabels?-1:1,u=this._map.getMode(),t,i;this._map&&this._map.getImageryId()!=="Streetside"&&(t=2e4,i=u.getRootElement(),n.set_style({zIndex:t+r}),i.append(n),this._stopEventsPropagation())},n.prototype._stopEventsPropagation=function(){var r,t,n;if(this._htmlElement)for(r={stopPropagation:!0},t=["mousemove","mousedown","mouseup","click","dblclick","contextmenu","touchmove","touchstart","touchend","keydown","keyup"],n=0;ni[r].getMaxZoom()))&&(typeof i[r].getMinZoom()!="number"||!(f=0&&n=0&&(this._primitives.splice(t,1),i=this._changedEventHandlers.splice(t,1),Array.prototype.push.apply(this._changedEventHandlers,i),Array.prototype.push.apply(this._primitives,[n]),this._primitiveChanged([n]))},t.prototype.getPrimitives=function(n,t){var i,r,f,u;if(!n&&!t)return this._primitives;if(i=[],this._primitives&&this.getVisible())for(r=0,f=this._primitives.length;r=0&&n1?n/255:n;this.r=t;this.g=i;this.b=r}return n.clone=function(t){var i;return t&&(i=new n(t.a,t.r,t.g,t.b)),i},n.fromHex=function(t){var r,i;return t&&(i=parseInt(t.slice(1),16),r=new n(255,i>>16&255,i>>8&255,i&255)),r},n.fromRGBA=function(t){var u=t.indexOf("("),f=t.indexOf(")"),i,r;if(u===-1||f===-1)return null;if(i=t.slice(u+1,f).split(","),r=null,i&&(i.length===4||i.length===3)){var e=parseInt(i[0]),o=parseInt(i[1]),s=parseInt(i[2]),h=i.length===4?parseFloat(i[3]):1;r=new n(h,e,o,s)}return r},n.prototype.clone=function(){return n.clone(this)},n.prototype.getOpacity=function(){return this.a},n.prototype.toHex=function(n){var t="#",i;if(n)for(i=0;i0?this._timerId=Microsoft.Maps.setTimeout(function(){f._invokeSetOptionsEvents(n)},u):this._invokeSetOptionsEvents(n)},t.prototype.setMap=function(n){var t=this,i=n;n?(this._createControl(),this._mouseenterVisibilityHandlerId=s.addHandler(this,"mouseenter",function(){t._cachedVisibilitySetting=t._options.visible;t._cachedVisibilitySetting||t.setOptions({visible:!0})}),this._mouseleaveVisibilityHandlerId=s.addHandler(this,"mouseleave",function(){t._cachedVisibilitySetting||t.setOptions({visible:!1})}),n instanceof et&&(i=n.getV8Map()),this._map=i,i.getOverlayManager().then(function(){i.getOverlays().insert(t);t.changed.invoke();t._createDescription();t._createCustomInfobox();t._adjustInfoboxSize()}),i.getMapOptions().allowInfoboxOverflow&&this._listenToMapChangedEvent()):this._map&&this._control&&!this._map.isDisposed()&&(i=this._map,i.getOverlayManager().then(function(){var n,r=i.getOverlays();r&&r.remove(t);(n=t.changed)===null||n===void 0?void 0:n.invoke()}),this._changeVisibilityDisposable&&this._changeVisibilityDisposable.dispose())},t.prototype.boolToDisplay=function(n){return n?"":"none"},t.prototype.optionsToClass=function(n){var t="Infobox";return n&&(n.title||(t=t+" no-title"),n.showCloseButton||(t=t+" no-close")),t},t.prototype.dispose=function(){if(this.setMap(null),this.click&&this.click.dispose(),this.infoboxChanged&&this.infoboxChanged.dispose(),this.mouseenter&&this.mouseenter.dispose(),this.mouseleave&&this.mouseleave.dispose(),this._control){for(var t in this._registeredJsEvents)i._undefineJSEventForDomEvent(this._control,t,this._registeredJsEvents[t].id),this._registeredJsEvents[t].dispose();this._control.removeFromParent();this._control.remove_event("click",this._clickHandler);this._control.remove_event("mouseenter",this._mouseenterHandler);this._control.remove_event("mouseleave",this._mouseleaveHandler);s.removeHandler(this._mouseenterVisibilityHandlerId);s.removeHandler(this._mouseleaveVisibilityHandlerId);this._control=null}n.prototype.dispose.call(this);i._nullifyClass(this)},t.prototype._getInfoboxElement=function(){return this._createControl(),this._customInfobox?this._control.select(t._customInfoboxClass):this._control.select(t._infoboxClass)},t.prototype._createControl=function(){var n=this,f,u,t;if(!this._control){for(this.click=new r,this.mouseenter=new r,this.mouseleave=new r,this._control=new yt(ki,this).applyDataTemplate(this),f={stopPropagation:!0},u=["mousemove","mousedown","mouseup","mousewheel","click","dblclick","contextmenu","touchmove","touchstart","touchend"],t=0;ta.pixelWidth-u.right&&(r.x=a.pixelWidth-u.right-b-t._padding);r.ya.pixelHeight-u.bottom&&(r.y=a.pixelHeight-u.bottom-o-t._padding);n=new f(l?r.x-e.x:e.x-r.x,e.y-r.y);k=this._customInfobox?0:parseInt(h.get_style("border-radius"))||8;y=k+t._pointerWidth/2;!c||n.xs-y?h.select(".infobox-stalk").set_style({display:"none"}):h.select(".infobox-stalk").set_style({display:"",left:n.x-t._pointerWidth/2+"px"})}}this.setAnchor(n)},t.prototype._adjustInfoboxSize=function(){var e,u,o,c;if(this._control){var i=this._getInfoboxElement(),n=i.select(".infobox-body"),r=void 0,f=void 0;if(this._customInfobox)this._control.set_style({display:""}),e=n.get_size(),r=e.height,f=e.width;else{u=i.select(".infobox-info");n.set_style({maxWidth:this._options.maxWidth+"px",maxHeight:this._options.maxHeight+"px"});this._control.set_style({display:""});o=this._control.get_style("left");this._control.set_style({left:"0px"});n.set_style({width:""});f=n.get_size().width;n.set_style({width:f});r=n.get_size().height;var l=parseInt(getComputedStyle(u[0],null).paddingTop.replace("px",""))||0,a=parseInt(getComputedStyle(u[0],null).paddingBottom.replace("px",""))||0,s=i.select(".infobox-title").get_size().height,h=i.select(".infobox-actions").get_size().height;s+u.get_size().height+h>r&&(c=r-s-h-l-a,u.set_style({maxHeight:c+"px"}));this._control.set_style({left:o})}this._control.set_style({display:this.boolToDisplay(this.getVisible())});i.select(".infobox-stalk").set_style({top:r-.2+"px",left:(f-t._pointerWidth)/2+"px"});this._changeAnchor()}},t.prototype._createCustomInfobox=function(){var i=this._options&&this._options.htmlContent,r,n,u;i&&(r=this._control&&this._control.select(t._customInfoboxClass),n=r&&r.select(".infobox-body"),n&&n.length>0&&(n.clear(),u=document.createElement("div"),u.innerHTML=i,n.append(u),this._customInfobox=!0,this.changed.invoke(new l(this,"htmlContent",undefined,i))))},t.prototype._createDescription=function(){var i=this._control&&this._getInfoboxElement(),n,t;i&&(n=i.select(".infobox-info")[0],n&&(n.innerHTML="",this._options.description&&(t=document.createElement("div"),t.innerHTML=this._options.description,n.appendChild(t))))},t.prototype._listenToMapChangedEvent=function(){var n=this,t=null;this._map&&(t=this._map.getMapOptions());t&&t.allowInfoboxOverflow&&(this._changeVisibilityDisposable=this._map.viewChanged.add(function(){n._visibleBeforeAnchorOutofBounds&&n._map.getBounds().contains(n.getLocation())&&(n.setOptions({visible:!0}),n._visibleBeforeAnchorOutofBounds=!1);n.getOptions().visible&&!n._map.getBounds().contains(n.getLocation())&&(n._visibleBeforeAnchorOutofBounds=!0,n.setOptions({visible:!1},!0))}))},t.prototype._invokeSetOptionsEvents=function(n){this.changed.invoke(new l(this,"options",this._options,n));this._adjustInfoboxSize();this.infoboxChanged&&this.infoboxChanged.invoke({target:this,targetType:"infobox",eventName:"infoboxChanged"})},t._pointerWidth=14,t._pointerHeight=16,t._defaultOptions={visible:!0,showCloseButton:!0,showPointer:!0,offset:new f(0,0),maxHeight:126,maxWidth:256,zIndex:1002,closeDelayTime:0},t._padding=10,t._customInfoboxClass=".InfoboxCustom",t._infoboxClass=".Infobox",t}(bt),ft=function(){function t(){}return t.loadModule=function(n,i){function l(){a--;a===0&&c&&c()}var u=[],e,f,v,r,s,y,p;typeof n=="string"?u.push(n):u=n;t._perfInstrument(u);var a=u.length,h=pt.dynamicProperties.credentials,c=i,o;if(typeof i=="object"&&(e=i,c=e.callback,h=e.credentials?e.credentials:h,o=e.errorCallback),lt.instance||new lt(h,!0),t.container)for(f=0,v=u.length;f>31,u=u<<1^u>>31,r=(i+u)*(i+u+1)/2+i;r>0;)e=r&31,r=(r-e)/32,r>0&&(e+=32),h.push(n._lookUpTable[e])}return h.join("")},n.decode=function(t){for(var l=[],h=0,a=0,v=0,p=t.length,r,c,f,e,i,u,o,s;h=p||(f=n._lookUpTable.indexOf(t[h++]),f===-1))return null;if(r+=(f&31)*Math.pow(2,c),c+=5,f<32)break}e=Math.floor((Math.sqrt(8*r+5)-1)/2);r-=e*(e+1)/2;i=r;u=e-i;u=u>>1^-(u&1);i=i>>1^-(i&1);a+=u;v+=i;o=v*1e-5;s=a*1e-5;o=Math.max(-85,Math.min(85,o));s=Math.max(-180,Math.min(180,s));l.push(new y(o,s))}return l},n._lookUpTable="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",n}(),rr=function(){function n(t){var i=this;this._disposables=[];this._layerEventTracker={};this._stateTracker={};this._onPrimitiveFocus=function(t){var u=o(t.srcElement),f=u.get_attr(n._primitiveIdAttribute),r=i._findPushpin(u.get_attr(n._layerIdAttribute),f);r&&(i._stateTracker[f]=r.getState(),r.setState(3))};this._onPrimitiveBlur=function(t){var u=o(t.srcElement),r=u.get_attr(n._primitiveIdAttribute),f=i._findPushpin(u.get_attr(n._layerIdAttribute),r);f&&(f.setState(i._stateTracker[r]),delete i._stateTracker[r])};this._onPrimitiveKeyPress=function(t){if(t.keyCode===13){var u=o(t.srcElement),f=u.get_attr(n._primitiveIdAttribute),r=i._findPushpin(u.get_attr(n._layerIdAttribute),f);r&&r.click&&r.click.invoke()}};this._sdkmap=t;this._disposables.push(this._sdkmap.layers.changed.add(function(n){i._onLayersChanged(n)}));this._processAddedLayers(this._sdkmap.layers);this._sdkmap.entities?this._processAddedLayers([this._sdkmap.entities]):this._sdkmap.getV8Map().frameManagerLoaded.addOne(function(){i._processAddedLayers([i._sdkmap.entities])})}return n.prototype.dispose=function(){var e=this,r,t,u,f;if(this._sdkmap){for(r=Object.keys(this._layerEventTracker),t=0,u=r.length;t0&&this._processAddedLayers(n.added);n.removed&&n.removed.length>0&&this._processRemovedLayers(n.removed)},n.prototype._processAddedLayers=function(n){var r=this,i,t,u,f;if(n)for(i=0;i0)for(s=this._sdkmap.getRootElement(),c=t.getId(),f=0;f0&&r.set_attr("aria-label",e.join(";")),u.getAriaHaspopup()&&r.set_attr("aria-haspopup","true"),u.isTapEnabled()&&r.set_attr("role","button"),s.appendChild(r[0]))}},n.prototype._findPushpin=function(n,t){for(var e,u,i,f=[this._sdkmap.entities].concat(this._sdkmap.layers.slice()),o=null,r=0;r=0,e=unescape(encodeURIComponent(this.getText())),s=n.replace(/{color}/g,u||"").replace(/{text}/g,e||""),n="data:image/svg+xml;base64,"+window.btoa(s)),this.image=n,this.imageSize=t,f=function(n,t){r.changed&&r.changed.invoke(new l(r,"image",n,t))},typeof this.image=="string"){var i=document.createElement("img"),c=!!this.anchor,h=function(n){var u,e,s,h;i.onload=null;window.clearTimeout(a);n?(t?(i.height=t.height||0,i.width=t.width||0):o.Browser.is_ie&&(i.style.visibility="hidden",u=document.createElement("div"),u.style.display="block",u.appendChild(i),document.body.appendChild(u),e=i.height,s=i.width,document.body.removeChild(u),i.height=e,i.width=s),c||r.setOptions({anchor:new w(i.width/2,i.height)}),f(null,r.image)):(h=r.image,r.image=null,f(h,r.image))},a=Microsoft.Maps.setTimeout(function(){return h(!1)},5e3);i.onload=function(){h(!0)};i.src=this.image;this.image=i}},t.prototype.isTapEnabled=function(){return this._hasTapEvents()||this._layerHasTapEvents()},t.prototype.isDoubleTapEnabled=function(){return this._hasDoubleTapEvents()||this._layerHasDoubleTapEvents()},t.prototype.isHoverEnabled=function(){return this._hasHoverEvents()||this._layerHasHoverEvents()||this.isTapEnabled()||this.isDoubleTapEnabled()||this.getDraggable()},t.prototype.isMoveEnabled=function(){return this._options.draggable},t.prototype._hasHoverEvents=function(){return this.getHoverStyleEnabled()||this.mouseover&&this.mouseover.hasHandlersRegistered()||this.mouseout&&this.mouseout.hasHandlersRegistered()},t.prototype._hasTapEvents=function(){return this.getClickedStyleEnabled()||this.click&&this.click.hasHandlersRegistered()||this.mouseup&&this.mouseup.hasHandlersRegistered()||this.mousedown&&this.mousedown.hasHandlersRegistered()},t.prototype._hasDoubleTapEvents=function(){return this.dblclick&&this.dblclick.hasHandlersRegistered()},t.prototype._layerHasHoverEvents=function(){var n=this.layer;return n&&(n.primitiveHoverStarted&&n.primitiveHoverStarted.hasHandlersRegistered()||n.primitiveHoverStopped&&n.primitiveHoverStopped.hasHandlersRegistered())},t.prototype._layerHasTapEvents=function(){var n=this.layer;return n&&(n.primitiveTapped&&n.primitiveTapped.hasHandlersRegistered()||n.primitivePointerPressed&&n.primitivePointerPressed.hasHandlersRegistered())},t.prototype._layerHasDoubleTapEvents=function(){var n=this.layer;return n&&n.primitiveDoubleTapped&&n.primitiveDoubleTapped.hasHandlersRegistered()},t.prototype.hasInternalId=function(){return this.entity&&this.entity.id&&/^Pushpin_[1-9]([0-9])*$/i.test(this.entity.id)?!0:!1},t.prototype.getState=function(){return this._state},t.prototype.setState=function(n){if(this._state!==n){var i=this._state;this._state=n;n===4&&this.bucket===t.defaultPushpinBucketId?this.bucket=t.defaultClickedPushpinBucketId:n!==4&&this.bucket===t.defaultClickedPushpinBucketId&&(this.bucket=t.defaultPushpinBucketId);this.changed&&this.changed.invoke(new l(this,"state",i,n))}},t.prototype._updateDefaultStyle=function(){var n=this;this._options.enableClickedStyle!==!0||this._clickedStyleDisposable?this._options.enableClickedStyle===!1&&(this._clickedStyleDisposable&&(this._clickedStyleDisposable.dispose(),this._clickedStyleDisposable=null),this.setState(2)):(this.click||(this.click=new r),this._clickedStyleDisposable=this.click.add(function(){n._updateClickedStyle()}));this._options.enableHoverStyle!==!0||this._hoverStartStyleDisposable||this._hoverStartStyleDisposable?this._options.enableHoverStyle===!1&&(this._hoverStartStyleDisposable&&(this._hoverStartStyleDisposable.dispose(),this._hoverStartStyleDisposable=null),this._hoverEndStyleDisposable&&(this._hoverEndStyleDisposable.dispose(),this._hoverEndStyleDisposable=null),this.setState(2)):(this.mouseover||(this.mouseover=new r),this.mouseout||(this.mouseout=new r),this._hoverStartStyleDisposable=this.mouseover.add(function(){n._updateHoverStartStyle()}),this._hoverEndStyleDisposable=this.mouseout.add(function(){n._updateHoverStoppedStyle()}))},t.prototype._updateClickedStyle=function(){this.getState()===4?(this.setState(2),this.getHoverStyleEnabled()&&this._updateHoverStartStyle()):this.setState(4)},t.prototype._updateHoverStartStyle=function(){this.getState()===2&&this.setState(3)},t.prototype._updateHoverStoppedStyle=function(){this.getState()===3&&this.setState(2)},t._pushpinId=1,t._defaultOptions={anchor:null,draggable:!1,icon:null,visible:!0,title:null,subTitle:null,enableHoverStyle:!1,enableClickedStyle:!1,text:null,textOffset:new f(0,5),color:null,cursor:"pointer",roundClickableArea:!1},t.defaultPushpinBucketId="999999",t.defaultClickedPushpinBucketId="999998",t}(pi),et=function(){function u(u,f,e,s,h,c,l){var a=this,y,d,v,w,b,g,p,tt,k,nt;if(this._disposables=[],this._disposables.push(this._mapLoaded=new r),this.layers=new ci(null,!1),y=[],this._disposables.push(this.layers.changed.add(function(t){a._mapHasLoaded?n.setTimeout(function(){a._onLayersChanged(t)},0):y.push(t)})),this._mapLoaded.addOne(function(){y.length>0&&n.setTimeout(function(){for(var n=0;n0){for(w=[],b=0,g=v;b-1&&(f.disableBirdseye?f.supportedMapTypes.splice(k,1):f.supportedMapTypes[k]=t.birdseyeV2));f.supportedMapTypes.push(t.highContrast);nt=f.labelOptions=f.labelOptions||{};typeof nt.labelVisibility=="undefined"&&typeof f.labelOverlay=="number"&&(nt.labelVisibility=f.labelOverlay);f.backgroundColor&&typeof f.backgroundColor!="string"&&(f.backgroundColor=f.backgroundColor.toHex());this._saveMapOptions(f);this._v8Map=new n.CoreMap(u,f,e,s,h,c,l);(f.bounds||f.center&&f.centerOffset)&&this.setView({bounds:f.bounds,center:f.center,centerOffset:f.centerOffset});f.pushpinAccessible&&this._toggleAccessibilityManager(!0);f.showSearchBar&&this._toggleSDKSearchBar(!0);this._templateSelector=new ni(this._v8Map);this._v8Map.getOverlayManager().then(function(){a._onOverlayManagerLoaded()});this._disposables.push(this.copyrightchanged=new r);this._v8Map.copyrightControlLoaded.addOne(function(n){a._disposables.push(n.changed.add(function(n){n.name==="copyrightAttributions"&&a.copyrightchanged.invoke()}))});this._disposables.push(this.viewchangestart=new r,this.viewchange=new r,this.viewchangeend=new r,this.viewrendered=new r,this._v8Map.mapPanStarted.add(function(n){a._raiseViewChangeStartEvent(n)}),this._v8Map.mapPanStopped.add(function(n){a._raiseViewChangeEndEvent(n)}),this._v8Map.targetViewChanged.add(function(n){a._v8Map.isPanning()||a._raiseViewChangeStartEvent(n)}),this._v8Map.viewChangingAfterPaint.add(function(n){a._raiseViewChangeEvent(n)}),this._v8Map.viewChanged.add(function(n){a._v8Map.isPanning()||a._raiseViewChangeEndEvent(n)}));this._v8Map.frameManagerLoaded.addOne(function(n){a._disposables.push(n.frameRendered.add(function(){a._raiseViewRenderedEvent({})}))},!1,!0);this._v8Map.targetViewChanged.isPreviouslyInvoked&&(this._viewChangeStartInitializationTimer=n.setTimeout(function(){a._raiseViewChangeStartEvent(a._v8Map.targetViewChanged.lastInvokedArgs)},0));this._v8Map.viewChanged.isPreviouslyInvoked&&(this._viewChangeEndInitializationTimer=n.setTimeout(function(){a._raiseViewChangeEndEvent(a._v8Map.viewChanged.lastInvokedArgs)},0));this._disposables.push(this._v8Map.mapTypeChanged.add(function(i){i.oldMapTypeId!==t.birdseyeV2&&i.newMapTypeId===t.birdseyeV2?n.BirdseyeV2Manager.hideLayersForSDKMap(a):i.oldMapTypeId===t.birdseyeV2&&i.newMapTypeId!==t.birdseyeV2&&n.BirdseyeV2Manager.showLayersForSDKMap(a)}));this.entities=new dt(null,this._v8Map);this.entities.setTemplateSelector(this._templateSelector);this._v8Map.getLayers().insert(this.entities)}return u.prototype._raiseViewChangeStartEvent=function(n){this._viewChangeStartInvoked||(this._viewChangeStartInvoked=!0,this.viewchangestart.invoke(n));window.clearTimeout(this._viewChangeStartInitializationTimer);window.clearTimeout(this._viewChangeEndTimer)},u.prototype._raiseViewChangeEvent=function(n){this._viewChangeStartInvoked&&this.viewchange.invoke(n)},u.prototype._raiseViewChangeEndEvent=function(t){var i=this;this._options.viewChangeEndDelay>0?this._viewChangeEndTimer=n.setTimeout(function(){i._viewChangeStartInvoked=!1;i.viewchangeend.invoke(t)},this._options.viewChangeEndDelay):(this._viewChangeStartInvoked=!1,this.viewchangeend.invoke(t));window.clearTimeout(this._viewChangeEndInitializationTimer)},u.prototype._raiseViewRenderedEvent=function(n){var t=this;setTimeout(function(){t.viewrendered.invoke(n)},0)},u.prototype._onLayersChanged=function(n){var o,u,h,t,f;if(this._v8Map){var s=this._v8Map.getLayers(),i=[],r=[],e=-1;if(n.added?(e===-1&&(e=n.addedIndex),i.push.apply(i,n.added)):n.removed&&r.push.apply(r,n.removed),i.length>0){for(o=[],t=0,f=i.length;t0)for(t=0,f=r.length;t0?n.padding:0;try{o*2<=Math.min(this.getHeight(),this.getWidth())?(r=this._v8Map.getMode().getMapViewWithBounds(c,{top:o,right:o,bottom:o,left:o}),this._v8Map.setView(r,u._constructAnimator(n,f,r))):(r=p.constructView(this._v8Map,c.center,8),this._v8Map.setView(r,u._constructAnimator(n,f,r)))}catch(b){r=p.constructView(this._v8Map,c.center,8);this._v8Map.setView(r,u._constructAnimator(n,f,r))}}else(n.center||typeof n.zoom=="number"||n.center&&n.centerOffset)&&((n.center||n.centerOffset)&&this._options.constrainBirdseyeView&&(h=this._v8Map.getMode(),e=h.getCurrentCrs(),e.reset&&e.reset()),v=this._computeMapCenterAfterOffset(n)||f.cameraLocation,r=p.constructView(this._v8Map,v,Math.round(typeof n.zoom=="number"?n.zoom:this.getZoom())),this._v8Map.setView(r,u._constructAnimator(n,f,r)));typeof n.labelOverlay=="number"&&(l=n.mapTypeId||this.getMapTypeId(),y=function(){var i=n.labelOverlay===wt.visible||l===t.road&&!s._options.allowHidingLabelsOfRoad?!0:!1;s._v8Map.getLabelController().setIsLabelsEnabled(i);s._v8Map.getMapOptions().labelOptions.labelVisibility=n.labelOverlay;(l===t.birdseyeV2||l===t.birdseye)&&s._updateBEv2LabelToggle(i)},this._v8Map.labelControllerLoaded.addOne(function(){y()},!1,!0));typeof n.heading!="number"||n.mapTypeId!==t.birdseye&&n.mapTypeId!==t.birdseyeV2&&(n.mapTypeId||i!==t.birdseye&&i!==t.birdseyeV2)||(w=ui.normalizeHeading(n.heading),r=f.clone(),r.heading=w,a=n.center,a&&(r.cameraLocation.latitude=a.latitude,r.cameraLocation.longitude=a.longitude),this._v8Map.setView(r,u._constructAnimator(n,f,r)))}this._v8Map.setViewInvoked.invoke(n)},u.prototype._updateBEv2LabelToggle=function(n){var t=this;this._v8Map.navigationBarLoaded.addOne(function(){var i=t._v8Map.getNavigationBar().getHelper();i.setLabelVisible(n);i.updateLabelToggleForBirdseyeV2()},!1,!0)},u._constructAnimator=function(n,t,i){var r=null;return n&&n.animate&&t&&i&&(r=new si(t,i)),r},u.prototype.tryLocationToPixel=function(n,t){var r,i,u;if(n instanceof y)return this._trySingleLocationToPoint(n,t);if(n.length){for(r=[],i=0;i180)&&(i.longitude=y.normalizeLongitude(r))}catch(e){return null}return i},u.prototype._saveMapOptions=function(n){function t(n,i,r){for(var u,f,s=Object.keys(i),e=0,o=s;e0?n[0]:[]},t.prototype.getStrokeColor=function(){return this._options.strokeColor},t.prototype.getStrokeDashArray=function(){return this._options.strokeDashArray},t.prototype.getStrokeThickness=function(){return this._options.strokeThickness},t.prototype.getTitle=function(){return this._options.title},t.prototype.getVisible=function(){return this._options.visible},t.prototype.setLocations=function(n){this.setRings([n])},t.prototype.getState=function(){return this._state},t.prototype.setState=function(n){if(this._state!==n){var t=this._state;this._state=n;this.changed&&this.changed.invoke(new l(this,"state",t,n))}},t.prototype.setOptions=function(n){var i=this._options,t={},r=this.getTemplate().getStyle(),f,u;if(t.strokeThickness=typeof n.strokeThickness=="number"?n.strokeThickness:i.strokeThickness,typeof n.strokeThickness=="number"&&(r.lineWidth=n.strokeThickness),t.strokeColor=n.strokeColor?n.strokeColor:i.strokeColor,n.strokeColor&&(r.strokeStyle=e(n.strokeColor)),t.strokeDashArray=n.strokeDashArray?n.strokeDashArray:i.strokeDashArray,n.strokeDashArray&&(r.dashes=k(n.strokeDashArray)),t.secondaryStrokeThickness=typeof n.secondaryStrokeThickness=="number"?n.secondaryStrokeThickness:i.secondaryStrokeThickness,typeof n.secondaryStrokeThickness=="number"&&(r.secondaryLineWidth=n.secondaryStrokeThickness),t.secondaryStrokeColor=n.secondaryStrokeColor?n.secondaryStrokeColor:i.secondaryStrokeColor,n.secondaryStrokeColor&&(r.secondaryStrokeStyle=e(n.secondaryStrokeColor)),t.fillColor=n.fillColor?n.fillColor:i.fillColor,n.fillColor&&(r.fillStyle=e(n.fillColor)),t.visible=typeof n.visible=="boolean"?n.visible:i.visible,t.generalizable=typeof n.generalizable=="boolean"?n.generalizable:i.generalizable,t.generalizable!==i.generalizable)for(f=this.geometry.rings,u=0;u0);if(a)lt=t.getRoundClickableArea()?1:2,b=pt(),ct.setValue(t,"anchor",b),this._preparePushpinImage(a,s),it=new rt(a,1,b,t,s),it.setHitTestShape(lt),e.push(it),!t.hasSvgText&&t.getText()&&(at=this._getTextAnchor(a.width,t.getTextOffset()),e=e.concat(c.getPushpinTextTemplates(null,a,at,b)));else if(i._renderAllPoiAndLabelsGL()&&t.hasVectorIcon()){var ut=pt(),k=t.getIcon(),bt=k.strokeWidth>0?k.strokeWidth:0,vt="".concat(ut.x,",").concat(ut.y,",").concat(k.radius,",").concat(bt);e=this._templateCache[vt];e||(e=[new u._VectorIconTemplate(k,1,ut)],this._templateCache[vt]=e)}else if(wt||ot)if(ft=n._pushpinColorIndex,t.taskDisplayState&&(ft=t.taskDisplayState.colorIndex),t.isMicroPoi)e=this._baseMapTemplateSelector.getPoiTemplate(c.microPoiBucket,s,nt,12,!1,!0,null,c.getPaletteKeyForCategory(t.groupCatId)||c.getPaletteKeyForCategory(t.catId));else{if(v=void 0,et=void 0,v=tt&&tt.poiType?tt.poiType:ot?2:t.catId||!this._useClassicSdkPoi?1:10,v===10&&(et=p._getColorMapping(ft)),e=this._baseMapTemplateSelector.getPoiVectorImageTemplate(t.catId,s,nt,v,ht,t.groupCatId,et),s!==4&&t.getText()){for(y=!1,d=0,yt=e.length;d=0?(r=i,r.alpha=f):n._defaultPoiLayerColorRgbaAlphas[u]&&(r=i,r.alpha=n._defaultPoiLayerColorRgbaAlphas[u]),t.alpha=f,r?r.toRgba():t.toRgba()},n.prototype._convertSDKColorToColor=function(n){var t=n;return n.toHex&&(t=n.toHex()),ot.parse(t)},n._cloneObject=function(n){var i,r,t,f,u;if(!n||typeof n!="object")return n;for(i={},r=Object.keys(n),t=0,f=r.length;t0&&this._onSuggestionSelection(null,f))}},u.prototype._onMapTypeChanged=function(n){n.oldMapTypeId!==n.newMapTypeId&&this._control.set_style({display:this.getDisplay()})},u.prototype._onMapResized=function(){this._autosuggestManager&&this._autosuggestManager.setOptions({maxResults:this._getMaxSuggestionsToQuery()})},u.prototype._getMaxSuggestionsToQuery=function(){var n=5,t,r;return this._map&&this._control&&(t=this._map.getHeight(),r=Math.floor((t-this._control.get_size().height-parseInt(this._control.get_style("top")))/95),n=i._clamp(r,2,n)),n},u}(bt),fr=function(){function n(){}return n.getColor=function(t){return t?"rgba("+Math.floor(n.getRandomNumber()*255)+","+Math.floor(n.getRandomNumber()*255)+","+Math.floor(n.getRandomNumber()*255)+", 0.5)":"#"+Math.floor(n.getRandomNumber()*16777215).toString(16)},n.getLocations=function(n,t){var i,r;if((!n||n<=0)&&(n=1),t=this._processLocationRect(t),!n||n<=1)return this.getRandomLocation(t);for(i=[],r=0;r0;u--)f.push(this._calculateCoord(t,(u*e+o)%360,i*Math.max(n.getRandomNumber(),.3)));return f},n._generateHoledPolygonPoints=function(t,i,r){for(var o=[],s=[],h=360/r,c=360*n.getRandomNumber(),u,f,e=r;e>0;e--)f=i*Math.max(n.getRandomNumber(),.3),u=(e*h+c)%360,o.push(this._calculateCoord(t,u,f)),s.push(this._calculateCoord(t,u,f*n.getRandomNumber()));return[o,s.reverse()]},n._calculateCoord=function(n,t,i){var r=n.latitude*Math.PI/180,e=n.longitude*Math.PI/180,u=i/6378100,f=Math.asin(Math.sin(r)*Math.cos(u)+Math.cos(r)*Math.sin(u)*Math.cos(t*Math.PI/180)),o=e+Math.atan2(Math.sin(t*Math.PI/180)*Math.sin(u)*Math.cos(r),Math.cos(u)-Math.sin(r)*Math.sin(f));return new y(f*180/Math.PI,o*180/Math.PI)},n._lipsum=["Lorem ipsum dolor sit amet","Tamquam invidunt praesent nam ne","Ut errem doming eos","An erat fuisset disputando sed","Sea in omittantur voluptatibus","Cibo aperiri eam ei","Qui at nemore abhorreant","Eripuit labores eu vel","Id sea hinc offendit","An liber semper reprimique vix","Te mei impetus accumsan","Solet aliquid eos no","No nec iriure argumentum","Sit an labore albucius euripidis","Nec cu ancillae accommodare","No vel quando scripta mnesarchum","Sea veritus necessitatibus ea","Ut sea modo omnes indoctum","Modus iisque voluptatibus te usu","Nulla ridens pertinacia qui ne","Ei aeque oblique electram has","Vim eu odio delicata","An fastidii suscipit vel","Ne malorum volutpat tractatos eum","Vocibus disputationi nec et","Nam cibo iudico ut","Ius ea possit eligendi","Ei civibus menandri posidonium has","Esse voluptua pri ut","At petentium interpretaris pri","Te natum iudico discere est","Enim libris id est","Ea quidam corpora reprehendunt vix","Est eu habeo nulla ullamcorper","No vel mucius labore consequuntur","Quodsi pertinax eu eam","Sensibus honestatis per ne","Est ex eruditi offendit probatus","Vix scaevola splendide assentior id","Dico iriure admodum sed ne","Munere vocent albucius est ne"],n._randomIndexNumber=0,n._fixedRandomNumber=[.7386382989127653,.2065695521004587,.7489809651835657,.7006290954692962,.04091025364671497,.9954127559729178,.4912746583039538,.33492258954447696,.00939051247581979,.9355370703076171,.6639112574906407,.6426966361780018,.3800605039195766,.6520244006764719,.4209986210406571,.6272502121915353,.5776952967358593,.047346452974710074,.7181255497508585,.3761793786749503,.14860266357998486,.800076502104903,.8501424964068189,.9455797454506294,.273840925209909,.9512738435986936,.0022886739742573603,.15367566682337164,.6459795802730335,.3362969951693593,.054336254044035304,.8588520113714642,.22937582572969895,.9740016245002041,.4607652665949822,.40322686905774097,.9171997385079895,.5880980730081158,.8724148495369748,.2239024700242871,.7676683143923331,.7926649750793715,.30415825012711917,.07293642344075457,.6753791383025063,.9679377523741153,.2038322560443715,.8129500820851909,.27077686182824223,.1684700203381848,.4993160557132863,.18293656572890726,.5757666932844097,.44912958854000773,.20395822630141502,.5219136226151808,.20601322250617948,.033178847605686235,.6959785547716033,.16399309933378792,.8595173804557417,.5437663007267504,.31875889100662835,.7186497378557282,.2914619029735994,.8841938161542489,.5348728984465658,.9076766706515857,.23562101989224282,.23108006829633676,.19450167514094852,.012137182682760983,.5625723905993567,.058086334903006076,.14774651602549294,.4986287987027942,.4361142980232129,.18451663552065267,.48824807947030413,.5964374217261839,.1416270467317997,.9406141464555404,.41207749360170154,.7663479353902358,.34355378128733816,.9459770580482947,.5008866762243267,.756600353201563,.4122854653758523,.7405594496989769,.8062874665554729,.005642643076812615,.5730359088967756,.45774660398273537,.12495085292892005,.7351135248926923,.9160158262525442,.12853493439491892,.39699927614726116,.30916913109636335],n}(),ti=function(n){function t(i){var r=n.call(this,"CustomLayer_"+t._tileId++)||this;return r._options={zIndex:t._defaultOptions.zIndex,visible:t._defaultOptions.visible,opacity:t._defaultOptions.opacity,downloadTimeout:t._defaultOptions.downloadTimeout,enableCORS:t._defaultOptions.enableCORS},r.setOptions(i),r}return a(t,n),t.prototype.getTileSource=function(){return this._options.mercator},t.prototype.setOptions=function(n){var i,r;if(n&&(this._downloadTimeoutInMS=Math.min(t._maxDownloadTimeout,this._options.downloadTimeout=typeof n.downloadTimeout=="number"?n.downloadTimeout:this._options.downloadTimeout),this._options.opacity=typeof n.opacity=="number"?n.opacity:this._options.opacity,this._options.visible=typeof n.visible=="boolean"?n.visible:this._options.visible,this._options.zIndex=typeof n.zIndex=="number"?n.zIndex:this._options.zIndex,this._enableCORS=this._options.enableCORS=typeof n.enableCORS=="boolean"?n.enableCORS:this._options.enableCORS,this._useCredentialsForCORS=this._options.useCredentialsForCORS=typeof n.useCredentialsForCORS=="boolean"?n.useCredentialsForCORS:this._options.useCredentialsForCORS,this.setVisible(this._options.visible),this.setZIndex(this._options.zIndex),this.setOpacity(this._options.opacity),i=n.mercator,!this._options.mercator&&i))for(this._options.mercator=i,i instanceof kt&&(i=[i]),r=0;r=0&&(this.isPrimary=u.which===1,this.isSecondary=u.which===3);n==="mousewheel"&&(this.wheelDelta=u.wheelDelta)}return n.prototype._setTargetType=function(n){switch(!0){case n instanceof h:this.targetType="pushpin";break;case n instanceof it:this.targetType="polyline";break;case n instanceof b:this.targetType="polygon";break;default:this.targetType=null}},n}();n.AnimatedTileLayer=gi;n.Color=gt;n.CustomOverlay=ut;n.EntityCollection=dt;n.Events=s;n.GroundOverlay=tr;n.Infobox=at;n.Layer=nt;n.PixelReference=v;n.Polygon=b;n.Polyline=it;n.Pushpin=h;n.SDKMap=et;u.SDKPrimitiveTemplateSelector=ni;n.Module=ft;n.MouseEventArgs=er;n.TestDataGenerator=fr;n.Themes={};n.Themes.BingTheme=nr;n.TileSource=kt;n.TileLayer=ti;typeof d!="undefined"&&(n.MapsTilePrimer=d);n.PointCompression=ir;n.loadModule=ft.loadModule;n.registerModule=ft.registerModule;n.moduleLoaded=ft.moduleLoaded;n.getIsBirdseyeAvailable=et.getIsBirdseyeAvailable;Microsoft.Maps.notifyMapReadyForBootstrap()}catch(ii){if(n.logger)n.logger.logCriticalError(ii);else throw ii;}}).call(window)